package baseFx.common.utils;

import java.util.Random;

public class RandomUtils {
    public static String numByRange(int min, int max) {
        Random r = new Random();
        return String.valueOf(min + r.nextInt((max - min)));
    }

    public static String numByLength(int length) {
        StringBuilder sb = new StringBuilder();
        do {
            sb.append(numByRange(100, 999));
        } while (sb.length() < length);
        return sb.substring(0, length);
    }
}
